import {fetch} from "@/utils/request";

let mapUrl = 'https://apis.map.qq.com'
// #ifdef H5
mapUrl = '/map-api'
// #endif

let MapApi = {

  getAddressInfoFromLocation(location) {
    return fetch({
      allowSuccess: true,
      url: `${mapUrl}/ws/geocoder/v1/`,
      method: 'GET',
      loading: true,
      params: {
        location,
        key: 'HIABZ-UA3KK-LCQJ5-AWOQQ-XBKSQ-WBFUW'
      }
    })
  },

}


export default MapApi